// This program produces an ASCII art drawing of a mirror. // // This version has been updated to use a for loop to print // the line at the top and bottom and a nested for loop // to print the dots in the body of the mirror. public class Mirror1 { public static void main(String[] args) { drawLine(); drawBody(); drawLine(); } // Prints a line that appears at the top and bottom of the mirror. public static void drawLine() { System.out.print("#"); for (int line = 1; line <= 16; line++) { System.out.print("="); } System.out.println("#"); } // Prints the middle, or body, of the mirror. public static void drawBody() { for (int line = 1; line <= 8; line++) { System.out.print("|"); System.out.print("<>"); for (int dot = 1; dot <= 12; dot++) { System.out.print("."); } System.out.print("<>"); System.out.println("|"); } } }